/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: Dec 31, 2009
 * Time: 11:16:57 AM
 * To change this template use File | Settings | File Templates.
 */
import org.jdom.Element;

// Referenced classes of package dk.brics.dsd:
//            Boolexp, Context, Schema

class ThisBoolexp extends Boolexp
{

    ThisBoolexp(Element element, Schema schema)
    {
    }

    byte evaluate(Context context)
    {
        return (byte) (context.e != context.this_e || context.n != context.this_n ? 2 : 1);
    }

    boolean isMentioned(Context context)
    {
        return false;
    }

    Element toXML(Context context)
    {
        return new Element("this", "http://www.brics.dk/DSD/2.0");
    }

    boolean containsThis(Context context)
    {
        return true;
    }
}
